using System;

namespace MetaView.Core;

/// <summary>
/// GZip压缩算法的压缩机
/// </summary>

public sealed partial class GZipDataCompressor : IDataCompressor
{
    byte[] IDataCompressor.Compress(ArraySegment<byte> data)
    {
        return GZip.Compress(data.Array, data.Offset, data.Count);
    }

    byte[] IDataCompressor.Decompress(ArraySegment<byte> data)
    {
        return GZip.Decompress(data.Array, data.Offset, data.Count);
    }
}